package com.hh.demo.feignClient;

import com.hh.demo.doc.CourseDoc;
import com.hh.demo.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search", fallbackFactory = CourseSearchFeignClientFallBackFactory.class)
public interface CourseSearchFeignClient {

    @PostMapping("/saveCourse")
    JSONResult saveCourse(@RequestBody CourseDoc doc);

    @PostMapping("/deleteCourse/{id}")
    JSONResult deleteCourse(@PathVariable("id") Long id);
}